package cn.iocoder.yudao.module.system.controller.admin.user.vo.scores;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import java.math.BigDecimal;

/**
 * 用户分数 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 */
@Data
public class UserScoresBaseVO {

    @Schema(description = "用户ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
    private Long userId;

    @Schema(description = "省份", example = "山东")
    private String province;

    @Schema(description = "年级", example = "高三")
    private String grade;

    @Schema(description = "首选科目", example = "物理")
    private String firstSubject;

    @Schema(description = "次选科目", example = "化学,生物")
    private String secondSubject;

    @Schema(description = "总分", example = "650.5")
    @DecimalMin(value = "0", message = "总分不能小于0")
    @DecimalMax(value = "999.99", message = "总分不能大于999.99")
    private BigDecimal score;

    @Schema(description = "排名", example = "1500")
    private String ranking;

    @Schema(description = "排名区间", example = "1000-2000")
    private String rankingRange;

    @Schema(description = "用户类型", example = "物理类")
    private String typeName;

    @Schema(description = "最低分数", example = "400.0")
    @DecimalMin(value = "0", message = "最低分数不能小于0")
    @DecimalMax(value = "999.99", message = "最低分数不能大于999.99")
    private BigDecimal minScore;

    @Schema(description = "最高分数", example = "750.0")
    @DecimalMin(value = "0", message = "最高分数不能小于0")
    @DecimalMax(value = "999.99", message = "最高分数不能大于999.99")
    private BigDecimal maxScore;

    @Schema(description = "考试年份", example = "2024")
    @Min(value = 2000, message = "考试年份不能小于2000")
    @Max(value = 2100, message = "考试年份不能大于2100")
    private Integer examYear;

    @Schema(description = "是否为当前使用的成绩记录", example = "true")
    private Boolean isCurrent;

    @Schema(description = "备注", example = "高考成绩")
    private String remark;

}